//
//  UIView+Common.m
//  ArtDog
//
//  Created by dllo on 16/9/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "UIView+RecentVC.h"
@implementation UIView (RecentVC)
- (UIViewController *)getVCRecently
{
    UIView *view = self;
    while (1) {
        if ([view.nextResponder isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)view.nextResponder;
        } else {
            if ([view.nextResponder isEqual:view]) {
                return nil;
            }
            view = (UIView *)view.nextResponder;
        }
    }
    
}

@end
